<template>
  <div>
    <mt-header title="卡酷公寓" fixed>
      <div slot="right" class="link">
        <router-link to="/register">注册</router-link>
        &nbsp;&nbsp;
        <router-link to="/login">登录</router-link>
      </div>
    </mt-header>
    <!-- 首页内容 -->
    <h1>这是收藏页面</h1>
    收藏页面

    <!-- 底部选项卡 -->


 <!-- 底部选项卡 -->
    <mt-tabbar v-model='selected' fixed>
      <mt-tab-item id="home">首页
        <img v-if="selected=='home'" src="../assets/home_1.png" slot="icon" alt="">
        <img v-else src="../assets/home_0.png" slot="icon" alt="">

        
      </mt-tab-item>
      <mt-tab-item id="shoucang">收藏      
        <img v-if="selected=='shoucang'" src="../assets/sc_1.png" slot="icon" alt="">
        <img v-else src="../assets/sc_0.png" slot="icon" alt="">
        
      </mt-tab-item>
       <mt-tab-item id="dingdan"> 订单管理     
        <img v-if="selected=='dingdan'" src="../assets/dingdan_1.png" slot="icon" alt="">
        <img v-else src="../assets/dingdan_0.png" slot="icon" alt="">

       </mt-tab-item>
       <mt-tab-item id="wode"> 我的
        <img v-if="selected=='wode'" src="../assets/wo_1.png" slot="icon" alt="">
        <img v-else src="../assets/wo_0.png" slot="icon" alt="">
       </mt-tab-item>
    </mt-tabbar>

  </div>
</template>

<script>
export default {
  data(){
    return {
      selected:'shoucang'
    }
  },
  watch:{

       navactive(newval){
      // 把page变量重置为1 
      // this.page = 1;
      // this.loadArticles(newval, 1, (list)=>{
      //   this.articles = list;
      // })
    },
    selected(newval){
      if(newval=='home'){this.$router.push('/')
      }else if(newval == 'wode'){this.$router.push('/wode')
      }else if(newval == 'dingdan'){this.$router.push('/dingdan')
      }else if(newval == 'shoucang'){this.$router.push('/shoucang')}
    }
  }
}
</script>

</script>
<style scoped>
.link a{
  color: white;
} 
.swipe img{
  width: 100%;
}
.articleItem {
  padding: 10px 0;
  margin: 0 10px;
  border-bottom: 1px solid #999;
}
.articleItem-header {
  font-weight: 600;
  font-size: 17px;
  color: #1a1a1a;
  line-height: 22px;
}
.articleItem-wrapper {
  display: flex;
  align-items: center;
  padding-top: 10px;
  width: 100%;
}
.articleImg {
  margin-right: 15px;
}
.articleImg img {
  width: 112px;
  height: 74px;
  border-radius: 5px;
}
.articleDes {
  height: 65px;
  font-size: 15px;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  line-height: 21px;
  letter-spacing: normal;
  color: #444;
}
.rb {
  background-color: #006699;
  color: white; text-align: center;
  height: 80px; line-height: 80px;
}
</style>
